<?php


namespace app\model;


use fast\Http;
use Ixudra\Curl\Facades\Curl;
use think\facade\Cache;
use think\facade\Log;
use think\Model;

/**
 * 通行记录
 */
class MqttFacePushInfo extends Model {

    public static function insert_compare_result($single_data){
        $data['face_id']=$single_data['face_id'];
        $data['score']=$single_data['score'];
        //$data['act']=$single_data[''];
        $data['user_name']=$single_data['name'];
        $data['device_id']=$single_data['device_id'];
        $device=ViidDevice::where('device_id','=',$data['device_id'])->find();
        if($device){
            $aizone=Aizone::find($device['aizone_id']);
            $data['aizone_id']=$device['aizone_id'];
            $data['aizone_name']=$device['aizone_name'];
            $data['device_name']=$device['name'];
            $data['dwid']=$device['dwid'];
            $data['address_id']=$aizone['name_code'];
        }
        /*$data['user_type']=$single_data[''];

        $data['wherefrom']=$single_data[''];

        $data['status']=$single_data[''];*/
        /*$data['']=$single_data[''];
        $data['']=$single_data[''];
        $data['']=$single_data[''];
        $data['']=$single_data[''];
        $data['']=$single_data[''];
        $data['']=$single_data[''];
        $data['']=$single_data[''];
        $data['']=$single_data[''];*/
        return self::create($data);

    }
}